﻿
<b><%= link_to "加一道菜", :action => 'new' %></b><br/>

<% for dish in @dishes %>
  <h1><%= h dish.name %></h1>
  
  <div id="dish_image">
  	<%= image_tag(image_url_in_server(dish.image_url), :size => "250x200" ) %>
  </div>
  <div id="dish_description">
	  <p>
	  	<%= h dish.description %><br/>
	  	
	    <%= link_to 'Show', :action => 'show', :id => dish %>
	    <%= link_to 'Edit', :action => 'edit', :id => dish %>
	    <%= link_to 'Destroy', { :action => 'destroy', :id => dish }, :confirm => 'Are you sure?', :method => :post %> &nbsp;&nbsp;&nbsp;
	    
	    <%= link_to 'Recommend', :action => 'recommend_dish', :id => dish %>
	  </p>
	</div>
	<p>&nbsp;</p>
<% end %>

<%= link_to 'Previous page', { :page => @dish_pages.current.previous } if @dish_pages.current.previous %>
<%= link_to 'Next page', { :page => @dish_pages.current.next } if @dish_pages.current.next %> 

<b>
<% if @dishes.size > 0 %>
	<%= link_to "加一道菜", :action => 'new' %>
<% end %>
</b>
